Optical media such as CDs (compact discs) and DVDs (originally, digital versatile discs) are read and written by way of a laser. The laser is driven by a laser driver, which receives waveforms that differ based upon the bit stream to be written and the type and specifications of the optical media. In order to support writing to a wide variety of media, including CD-R, CD-RW, DVD-R, DVD+R, DVD-RW, DVD+RW, and DVD-RAM, a flexible waveform generation scheme is needed.